package com.xiaoge.system.controller;


import com.xiaoge.response.Result;
import com.xiaoge.system.entity.Traffic;
import com.xiaoge.system.service.TrafficService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaoge
 * @since 2021-04-19
 */
@RestController
@RequestMapping("/system/traffic")
public class TrafficController {

    @Autowired
    public TrafficService trafficService;
    @PostMapping("/getUserNum")
    public Result getUserNum(){
        List<Traffic> list = trafficService.getUserNum();
        return Result.ok().data("records",list);
    }
}

